package com.sen.common.widget.form;

import com.sen.common.widget.Attributes;

/**
 * @author sen
 */
public class TextField extends Input {

	private String size;

	public TextField() {
		this(null);
	}
	
	public TextField(String name) {
		super("text");
		this.name(name);
	}

	public TextField size(int size) {
		this.size = String.valueOf(size);
		return this;
	}

	@Override
	protected String specialAttributes() {
		return super.specialAttributes()
				+ Attributes.attrIfNonblank("size", size);
	}

}
